import { applyDecorators } from "@nestjs/common";
import { ApiProperty, ApiPropertyOptional, PartialType as PartialTypeFromSwagger } from "@nestjs/swagger";
import { Exclude, Type } from "class-transformer";
import { IsBoolean, IsEmail, IsNotEmpty, IsNumber, IsOptional, IsString, MaxLength, MinLength } from "class-validator";
import { i18nValidationMessage } from "nestjs-i18n";
import { PartialType, OmitType } from '@nestjs/mapped-types';
import { IdValidators, SortValidators, StatusValidators } from '../decorators/dto.decorators';
export class CreateRoleDto{
    @ApiProperty({ description: 'Name', example: 'role' })
    name: string;

    @StatusValidators()
    @ApiProperty({ description: '状态', example: 1 })
    status: number;

    @SortValidators()
    @ApiProperty({ description: '排序号', example: 100 })
    sort: number;
}

export class UpdateRoleDto extends PartialType(CreateRoleDto){
    @IdValidators()
    id: number;
}

export class UpdateRoleAccessesDto {
    readonly accessIds: number []
}
